Skip to content

[v0] remove APHRODITE_USE_V1 from platform and v1#1590

Merged
AlpinDale merged 1 commit into
mainfrom
v0-remove-platform
Nov 4, 2025
Merged

[v0] remove APHRODITE_USE_V1 from platform and v1#1590
AlpinDale merged 1 commit into
mainfrom
v0-remove-platform

Conversation

@AlpinDale

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: AlpinDale <alpindale@gmail.com>
@AlpinDale AlpinDale merged commit e5538f1 into main Nov 4, 2025
1 check passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request focuses on removing the APHRODITE_USE_V1 environment variable, effectively making the v1 engine the default and only path. The changes primarily involve removing conditional logic based on this variable and updating log messages across various platform-specific files. The refactoring is generally well-executed, but I've identified a couple of minor issues. One is a potential change in logging behavior due to a missing scope parameter, and the other is a leftover reference to the use_v1 variable in an error message. Addressing these points will help ensure the cleanup is complete and consistent.

Comment on lines +380 to 383
logger.info_once(
"Using FlexAttention backend for %s.",
", ".join(f"{k}={v}" for k, v in use_flex_attention_reason.items()),
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The scope="global" parameter has been removed from this logger.info_once call. This changes the logging behavior from logging once per process to once per worker (the default), which can lead to duplicated log messages in a multi-worker environment. This appears to be an oversight, as other similar logging calls in this file retained scope="global".

Suggested change
logger.info_once(
"Using FlexAttention backend for %s.",
", ".join(f"{k}={v}" for k, v in use_flex_attention_reason.items()),
)
logger.info_once(
"Using FlexAttention backend for %s.",
", ".join(f"{k}={v}" for k, v in use_flex_attention_reason.items()),
scope="global",
)

return FLASH_ATTN
elif selected_backend:
raise ValueError(
f"Invalid attention backend for {cls.device_name}, with use_v1: {use_v1} use_mla: {use_mla}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The use_v1 variable is referenced in this error message, but it's being removed as part of this refactoring. This reference should be removed to avoid confusion and make the code cleaner, as the concept of v1 is being deprecated.

Suggested change
f"Invalid attention backend for {cls.device_name}, with use_v1: {use_v1} use_mla: {use_mla}"
f"Invalid attention backend for {cls.device_name}, with use_mla: {use_mla}"

@AlpinDale AlpinDale deleted the v0-remove-platform branch November 4, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant